// 喜欢歌曲

// const express = require('express');
// const app = express();
const Http = require('../util/request');

module.exports = (query, request) => {
    // console.log(query)
    const data = {
        trackId: query.query.id,
        like: query.query.like
    };
    Http(
        'POST', `https://music.163.com/weapi/radio/like?alg=${query.alg ||
        'itembased'}&trackId=${query.query.id}&time=${query.time ||
        25}`, data,
        {crypto: 'weapi', cookie: query.cookies, proxy: query.proxy}
    ).then(res => {
        request.json(res)
    }).catch( err => {
        request.json(err)
    })
};
